function getRandInt(min, max) {
    min = Math.ceil(min);
    max = Math.floor(max);
    return Math.floor(Math.random() * (max - min)) + min;
}

export function rndpickarr(arr, length = 1) {
    let s = arr;
    let keys = arr.map((v,k)=>{return k});
    let ret = [];
    for (let i =0; i <length; i++) {
        let pickindex = getRandInt(0, keys.length);
        ret.push(keys[pickindex]);
        keys.splice(pickindex, 1);
    }
    return ret;
}
